package demo21;

import java.util.Arrays;

public class Main {
    public static void main(String[] args){
        int[]array={5,3,4,9,1,8};
        System.out.println("霍尔法排序前：");
        System.out.println(Arrays.toString(array));
        sort s=new sort();
       s.quickSort(array);
       System.out.println("排序后：");
       System.out.println(Arrays.toString(array));
       System.out.println("挖坑法快速排序:");
       System.out.println();
       int []array2={6,4,32,0,9,4,5,2};
       System.out.println("排序前：");
       System.out.println(Arrays.toString(array2));
       s.quickSort2(array2);
       System.out.println("排序后：");
       System.out.println(Arrays.toString(array2));
       System.out.println();
       System.out.println("快速排序中前后指针法:");
       System.out.println("排序前：");
       int[] array3={3,1,7,4,90,56,0,57,89,123};
       System.out.println(Arrays.toString(array3));
       System.out.println("排序后：");
       s.quickSort3(array3);
       System.out.println(Arrays.toString(array3));


    }
}
